package com.bbird.od.finance.service.models.type;

import com.alibaba.fastjson.annotation.JSONType;
import lombok.Getter;

/**
 * @author ziyang Kuang
 * @date 2020/11/16
 * @describe 银行流水费用类型
 */

@Getter
@JSONType(serializeEnumAsJavaBean = true)
public enum BankCostType {

    JD_DELIVERY_FEE("代收配送费"),
    JD_ELECTRONIC_INVOICE_FEE("非套餐电子发票费"),
    JD_BEAN_FEE("随单送的京豆"),
    JD_GOODS_FEE("货款"),
    JD_COMMISSION_FEE("佣金"),

    PDD_TRADE_INCOME("交易收入"),
    PDD_COUPON_SETTLEMENT("优惠券结算"),
    PDD_TECHNOLOGY_SERVICE_COST("技术服务费"),
    PDD_REFUND("退款"),
    PDD_THE_OTHER_SOFTWARE_COST("其他软件服务"),
    PDD_OTHERS("其他"),
    PDD_TRANSFER("转账"),
    PDD_D_D_J_B("多多进宝"),
    PDD_DEDUCTION("扣款"),
    PDD_WITHDRAW("提现"),

    TM_TRADE_INCOME("交易付款"),
    TM_TOLL("收费"),
    TM_TRANSFER("转账"),
    TM_TRANSACTION_SPLIT("交易分账"),
    TM_ONLINE_PAY("在线支付");

    private String label;
    private String name;

    BankCostType(String label) {
        this.name = name();
        this.label = label;

    }

    public static BankCostType getByLabel(String label) {
        for (BankCostType value : BankCostType.values()) {
            if (value.getLabel().equals(label)) {
                return value;
            }
        }
        return null;
    }
}
